import React from 'react';
import {useHistory} from "react-router-dom";
import code from "../../model/code";
import http from "../../model/http";

function Entry() {
  const history = useHistory(),query = http.useQuery(),type = query.get('type');
    (async ()=>{
      await code.getUser();
      const outUserId = await code.getOutUserId();
      outUserId && history.replace(`/user?type=${type}&outUserId=${outUserId}`)
    })()
  return (
      <p>正在查询顾客信息...</p>
  )
}

export default Entry;